// 手机号格式校验
const mobileValidate = (mobile) => {
  const reg = /^\d{11}$/
  return reg.test(mobile)
}

// 密码格式校验
const passwordValidate = (password) => {
  const reg = /^[a-zA-Z0-9]{8,16}$/
  return reg.test(password)
}

// 手机验证码格式校验
const phoneCodeValidate = (code) => {
  const reg = /^\d{6}$/
  return reg.test(code)
}

export default {
  mobileValidate,
  passwordValidate,
  phoneCodeValidate
}
